home *** CD-ROM | disk | FTP | other *** search
/ Nejlepší hry / Nejlepsi hry.iso / hry / plane arcade / planearcade.exe / tank3.bmp / spitfire.h < prev    next >
C/C++ Source or Header  |  2004-09-28  |  3KB  |  167 lines

  1.  
  2. //================================================================
  3. #ifndef _SPITFIRE_H_
  4. #define _SPITFIRE_H_
  5. //================================================================
  6. //hracove lietadlo - spitfire
  7.  
  8. //rychlos¥
  9. #define SpitFire_MinSpeed 8.5f
  10. #define SpitFire_MaxSpeed 12.0f
  11.  
  12. //kolizne a gulometove body
  13. #define SpitFire_Left  Get3D(-40.0f,0.0f,0.0f)
  14. #define SpitFire_Right Get3D(40.0f,0.0f,0.0f)
  15. #define SpitFire_Up    Get3D(0.0f,6.0f,0.0f)
  16. #define SpitFire_Down  Get3D(0.0f,-6.0f,0.0f)
  17. #define SpitFire_Front Get3D(0.0f,0.0f,20.0f)
  18. #define SpitFire_Back  Get3D(0.0f,0.0f,-43.0f)
  19. #define SpitFire_BulletLeft  Get3D(-15.42f,-2.0f,10.0f)
  20. #define SpitFire_BulletRight Get3D(15.42f,-2.0f,10.0f)
  21. //#define SpitFire_BulletLeft  Get3D(-15.0f,-5.0f,0.0f)
  22. //#define SpitFire_BulletRight Get3D(15.0f,-5.0f,0.0f)
  23.  
  24. //vrtula
  25. #define SpitFire_VrtulaPoint Get3D(-0.419f,1.75f,20.0f)
  26.  
  27. //hlasitost zvuku
  28. #define SpitFire_SoundScale  15.0f
  29.  
  30. //frekvencia strielania
  31. #define SpitFire_BulletFreq 100.0f
  32.  
  33. //frekvencia bomb
  34. #define SpitFire_BombFreq 150.0f
  35.  
  36. //maximalna cas mimo hracieho pola
  37. #define SpitFire_MapSize 10000.0f
  38.  
  39.  
  40.  
  41.  
  42. //----------------------------------------------------------------
  43. // Name: SPITFIRE class
  44. // Desc: hracove lietadlo
  45. //----------------------------------------------------------------
  46. class SPITFIRE
  47. {
  48. private:
  49.  
  50.     MODEL ModelNormal1;
  51.     MODEL ModelNormal2;
  52.     MODEL ModelDestroyed;
  53.     MODEL ModelShadow;
  54.     MODEL ModelVrtula;
  55.     MODEL ModelKabina;
  56.  
  57.     //zvuk
  58.     SOUND Sound;
  59.     bool SoundPlay;
  60.  
  61.     //zisti koliziu 
  62.     bool GetGroundCollision();
  63.  
  64.     //zobrazenie ked je mimo mapy, mission failed,
  65.     //accomplished, stmavovanie obrazu
  66.     DXFONT MFont;
  67.     DXFONT Font;
  68.     PANEL2D BackGround;
  69.     PANEL2D MsgBack;
  70.     float BkTime;bool InMode;bool OutMode;
  71.     bool ComMode;bool FaiMode;bool ScoMode;
  72.  
  73.     //message
  74.     float MessageOnTime;
  75.     float MessageLifeTime;
  76.     char  MessageBuffer[120];
  77.  
  78.     //fire bullet
  79.     PARTICLE BulletFire;
  80.     float BulletAlpha;
  81.     float Bullet1Rot;
  82.     float Bullet2Rot;
  83.  
  84. public:
  85.  
  86.     //vlastnosti
  87.     float Speed;
  88.     int Life;
  89.     int Bombs;
  90.     int Score;
  91.     int FakeScore;
  92.     int ModelMode;
  93.  
  94.     bool ShowCompas;
  95.     bool ShowFPS;
  96.     bool ShowMap;
  97.     bool ShowKokpit;
  98.  
  99.     //m≤dy
  100.     bool NormalMode;
  101.     bool CrazyMode;
  102.     bool DestroyedMode;
  103.  
  104.     //pozicia a matica
  105.     VECTOR3D Pos;
  106.     VECTOR3D Rot;
  107.     VECTOR3D ConRot;
  108.     D3DXMATRIX Matrix;
  109.  
  110.     //vrtula
  111.     VECTOR3D PV;
  112.     float VrtulaRotation;
  113.  
  114.     //kolizne body 
  115.     VECTOR3D PL,PR,PU,PD,PF,PB ;
  116.  
  117.     //bod pre sledovanie
  118.     VECTOR3D SlPoint;
  119.  
  120.     //strely
  121.     BULLETSYSTEM Bullet;
  122.     VECTOR3D BL,BR;
  123.     bool BulletActive;
  124.     float BulletTime;
  125.  
  126.     //bomby 
  127.     BOMBSYSTEM Bomb;
  128.     float BombTime;
  129.  
  130.     //mission failed, completed 
  131.     void MissionFailed();
  132.     void MissionExit();
  133.     void MissionCompleted();
  134.  
  135.     //zastavi zvuk
  136.     void StopSound();
  137.  
  138.     //inicializacia 
  139.     void Initialize();
  140.  
  141.     //system
  142.     void Reset();
  143.  
  144.     //refresh 
  145.     void Refresh();
  146.  
  147.     //camera
  148.     void SetCamera();
  149.  
  150.     //shadow
  151.     void Render();
  152.  
  153.     //oznamy a obrazovky
  154.     void DrawScreens();
  155.  
  156.     //vytlac oznam pre hraca
  157.     void DrawMessage(char *MessageEng,char *MessageCze,float LifeTime);
  158.  
  159.     //kolizia s lietadlom
  160.     bool CollisionDetail(VECTOR3D P1, VECTOR3D P2);
  161.     bool CollisionBox(VECTOR3D P1, VECTOR3D P2);
  162.  
  163. };
  164.  
  165.  
  166. //================================================================
  167. #endif //_SPITFIRE_H_